import os
import random
prifix = 'C:/Users/zoro/Desktop/A02/images1/'
images = os.listdir(prifix)
random.shuffle(images)
i = 1
for file_name in images:
    old_name = os.path.join(prifix,file_name)
    new_name = os.path.join(prifix,f'{i:03d}.jpg')
    os.rename(old_name,new_name)
    i = i + 1